package com.mcxx.modules.miniSalvation.welfare.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;
import java.util.Date;


@Data
public class WelfareOrderDTO implements Serializable {
	private static final long serialVersionUID = -1;

	@ApiModelProperty(value = "保障金调整id")
	private String welfareId;

	@ApiModelProperty(value = "业务Id")
	private String orderId;

	@ApiModelProperty(value = "保障家庭主体Id")
	private String familyId;

	@ApiModelProperty(value = "户主成员Id")
	private String memberId;

	@ApiModelProperty(value = "业务类型")
	private String businessType;

	@ApiModelProperty(value = "业务标准")
	private String standType;

	@ApiModelProperty(value = "社区代码")
	private String areaCode;

	@ApiModelProperty(value = "乡镇/街道")
	private String streetCode;

	@ApiModelProperty(value = "保障人姓名")
	private String name;

	@ApiModelProperty(value = "保障人身份证号")
	private String idcard;

	@ApiModelProperty(value = "业务开始享受待遇时间")
	private Date startDate;

	@ApiModelProperty(value = "业务结束享受待遇时间")
	private Date endDate;

	@ApiModelProperty(value = "业务办理类型")
	private String type;

	@ApiModelProperty(value = "家庭人口数")
	private Integer familyNum;

	@ApiModelProperty(value = "家庭保障人数")
	private Integer saveMemberNumber;

	@ApiModelProperty(value = "家庭残疾人数")
	private Integer familyDisabilityCnt;

	@ApiModelProperty(value = "调标前享受的待遇")
	private Double salaryNumber;

	@ApiModelProperty(value = "调标前基本生活费")
	private Double baseSalaryNumber;

	@ApiModelProperty(value = "特困调标前照料费")
	private Double careSalaryNumber;

	@ApiModelProperty(value = "低保调标前分类救助金")
	private Double kindSalaryNumber;

	private String olfCountType;

	private String countType;

	private String saveType;

	private String supplyType;

	private String supplyOrgId;

	private Double familyRevenue;


	public String checkCanWelfare() {
		String msg = null;
		if(StringUtils.isEmpty(countType)) {
			msg = String.format("该家庭%s/%s保障金计算方式为空，无法调标", idcard, name);
		}
		if(null == familyRevenue) {
			msg = String.format("该家庭%s/%s人均月收入为空，无法调标", idcard, name);
		}
		return msg;
	}
}
